<script setup>
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import MyView from '@/components/MyView.vue'
let route = useRoute()
let router = useRouter()
let id = ref(route.query.id)
let name = ref(route.query.name)
function toPage() {
  // router.push('/about/12/34')
  router.replace('/about/12/34')
}
</script>

<template>
  <!-- {{ id }}------{{ name }}
  <button @click="toPage">到About</button> -->
  <MyView>
    <div>
      <h1>我是h1</h1>
    </div>
    <template #footer>
      <h2>我是footer</h2>
    </template>
    <template #main>
      <h3>我是main</h3>
    </template>
    <template #scope="{ user }">{{ user.id }} {{ user.name }}</template>
  </MyView>
  <el-button>button</el-button>
</template>
